package com.castle.fortress.admin.rule.list.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.castle.fortress.admin.rule.list.dto.RuleListDto;
import com.castle.fortress.admin.rule.list.entity.RuleListEntity;

import java.util.List;

/**
 * 规则清单信息表 服务类
 *
 * @author
 * @since 2025-04-22
 */
public interface RuleListService extends IService<RuleListEntity> {

    /**
     * 分页展示规则清单信息表列表
     * @param page
     * @param ruleListDto
     * @return
     */
    IPage<RuleListDto> pageRuleList(Page<RuleListDto> page, RuleListDto ruleListDto);


    /**
     * 展示规则清单信息表列表
     * @param ruleListDto
     * @return
     */
    List<RuleListDto> listRuleList(RuleListDto ruleListDto);

    /**
     * 保存规则清单及其关联的规则
     * @param ruleListDto 规则清单信息
     * @return 是否保存成功
     */
    boolean saveRuleListWithRules(RuleListDto ruleListDto);

    /**
     * 更新规则清单及其关联的规则
     * @param ruleListDto 规则清单信息
     * @return 是否更新成功
     */
    boolean updateRuleListWithRules(RuleListDto ruleListDto);

    /**
     * 获取规则清单详情
     * @param id 规则清单ID
     * @return 规则清单详情
     */
    RuleListDto getRuleListDetail(Long id);

    /**
     * 删除规则清单及其关联的规则
     * @param id 规则清单ID
     * @return 是否删除成功
     */
    boolean deleteRuleListWithRules(Long id);
}
